<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>自定义菜单管理</h2>
    </div>

    <div class="clearfix with-padding row">
        <div class="col-xs-10">
            <a class="btn" href="{:U('add')}">新 增</a>
            <a class="btn" href="{:U('create')}"  >生成微信自定义菜单</a>
        </div>
    </div>

    <div class="with-padding">
        <form action="{:U()}" method="post" class="form-horizontal" >
        <ul class="channel-ul">
        <volist name="list" id="cm">
            <include file="_li"/>
        </volist>
        </ul>

            <div class="form-item with-padding">
                <button class="btn submit-btn ajax-post no-refresh" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
        </form>
    </div>



<div id="one-nav" class="hide">
    <li class="clearfix pLi" >
        <input name="cm[1][sort][]" class="sort" style="width: 30px;" >
        <div class="pull-left nav_list">
            <select name="cm[1][type][]" class="form-control nav-type" style="width: 150px;">
                <php>foreach($type as $k=>$v){</php>
                <option value="{$k}" >{$v}</option>
                <php>}unset($k,$v)</php>
            </select>

            <input name="cm[1][title][]" placeholder="请输入标题" class="form-control title" style="width: 100px;" value="">
            <input name="cm[1][keyword][]" placeholder="请输入关键词"  class="form-control keyword" style="width: 200px;" value="">
            <input name="cm[1][url][]" placeholder="请输入链接"  class="form-control url" style="width: 300px;" value="">
            <input name="cm[1][token][]" placeholder=""  class="form-control title" style="width: 200px;display: none" value={:get_token()}>
            <input name="cm[1][status][]" placeholder=""   class="form-control title" style="width: 30px;display: none" value="{$cm.status}">
        </div>

        <div class='pull-left i-list'>

            <a href="javascript:" title="添加一级菜单"  class="add-one"><i class="icon icon-plus"></i></a>
            <a href="javascript:" title="移除此菜单" class="remove-li"><i class="icon icon-remove"></i></a>
            <a href="javascript:" title="添加子菜单" class="add-child"><i class="icon icon-sitemap"></i></a>
            <a href="javascript:" title="移动菜单排序"><i class="icon icon-move sort-handle-1"></i></a>
        </div>


    </li>

</div>

    <div id="two-nav" class="hide">

        <li class="clearfix" >
            <input name="cm[2][pid][]" class="pid" style="display: none">
            <input name="cm[2][sort][]" class="sort" style="width: 30px;" >
            <div class="pull-left nav_list">

                <select name="cm[2][type][]" class="form-control nav-type" style="width: 150px;">
                    <php>foreach($type as $k=>$v){</php>
                    <option value="{$k}" >{$v}</option>
                    <php>}unset($k,$v)</php>
                </select>

                <input name="cm[2][title][]" placeholder="请输入标题" class="form-control title" style="width: 100px;" value="">
                <input name="cm[2][keyword][]" placeholder="请输入关键词"  class="form-control keyword" style="width: 200px;" value="">
                <input name="cm[2][url][]" placeholder="请输入链接"  class="form-control url" style="width: 300px;" value="">
                <input name="cm[2][token][]" placeholder=""  class="form-control title" style="width: 200px;display: none" value={:get_token()}>
                <input name="cm[2][status][]" placeholder=""   class="form-control title" style="width: 30px;display: none" value="{$cm.status}">
            </div>

            <div class='pull-left i-list'>

                <a href="javascript:" title="添加菜单"  class="add-two"><i class="icon icon-plus"></i></a>
                <a href="javascript:"  title="移除此菜单" class="remove-li"><i class="icon icon-remove"></i></a>
                <a href="javascript:" title="移动菜单排序"><i class="icon icon-move sort-handle-2"></i></a>
            </div>


        </li>

    </div>



</block>

<block name="script">
    <script src="__JS__/jquery.simple-color.js"></script>
    <script src="__JS__/custommenu.js"></script>
    <script src="__ZUI__/lib/chosen/chosen.icons.min.js"></script>
    <link href="__ZUI__/lib/chosen/chosen.icons.css" rel="stylesheet">
</block>